import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue')
  },
  {
    path: '/',
    name: '',
    component: () => import('@/views/layout/index.vue'),
    children:[
      {
        path:'',
        name:'home',
        component: () => import('@/views/home/home.vue'),
      },
      {
        path:'/sumDevices',
        name:'sumDevices',
        component: () => import('../views/device/sum-device.vue'),
      },
      {
        path:'/device/plating/:categoryId',
        name:'device',
        component: () => import('@/views/device/device-plating.vue'),
      },
      {
        path:'/check-config',
        name:'checkConfig',
        component: () => import('@/views/check/check-config.vue'),
      },
      {
        path:'/check-log',
        name:'checkLog',
        component: () => import('@/views/check/check-log.vue'),
      },
      {
        path:'/list-detail',
        name:'checkLogDetail',
        component: () => import('@/views/check/list-detail.vue'),
      },
      {
        path:'/device/machine/:categoryId',
        name:'checkMachine',
        component: () => import('../views/device/device-machine.vue'),
      },
      {
        path:'/device/foundry/:categoryId',
        name:'checkFoundry',
        component: () => import('../views/device/device-foundry.vue'),
      },
      
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
